﻿using AnesSystem.Models;
using AnesSystem.Services;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels
{
    class ConfigDrugGroupTypesDataGridViewModel : BaseViewModel<ConfigDrugGroupTypesDataGridViewModel>
    {
        #region Variables

        private ObservableCollection<ConfigDrugGroupTypesModel> _configDrugGroupTypesModel = new ObservableCollection<ConfigDrugGroupTypesModel>();

        #endregion

        #region Constructor

        public ConfigDrugGroupTypesDataGridViewModel()
        {
            initConfigDrugGroupTypesModel();
        }

        #endregion

        #region Properties

        public ObservableCollection<ConfigDrugGroupTypesModel> ConfigDrugGroupTypesModel
        {
            get
            {
                return _configDrugGroupTypesModel;
            }

            set
            {
                _configDrugGroupTypesModel = value;
                RaisePropertyChanged("ConfigDrugGroupTypesModel");
            }
        }

        #endregion

        #region Event

        #endregion

        #region Private Methods
        private void initConfigDrugGroupTypesModel()
        {
            IEnumerable<ConfigDrugGroupTypesModel> list = ConfigDrugGroupTypesModelService.Instance.FindAll();
            foreach (var item in list)
            {
                _configDrugGroupTypesModel.Add(item);
            }
        }

        
        #endregion

        #region Public/Protected Methods


        #endregion

        #region EventHandlers

        #endregion

        #region Command

        #region ChangeDoctorCommand

        #endregion

        #region OpenPopupCommand

        #endregion
        #endregion

    }
}
